// vite.config.ts
import { createSvgIconsPlugin } from "file:///D:/wrod/vue3/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_vite@5.2.12_@types+node@20.14.8_sass@1.77.2_/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import { defineConfig, loadEnv } from "file:///D:/wrod/vue3/node_modules/.pnpm/vite@5.2.12_@types+node@20.14.8_sass@1.77.2/node_modules/vite/dist/node/index.js";
import vue from "file:///D:/wrod/vue3/node_modules/.pnpm/@vitejs+plugin-vue@5.0.4_vite@5.2.12_@types+node@20.14.8_sass@1.77.2__vue@3.4.27_typescript@5.4.5_/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import path from "path";
import { viteMockServe } from "file:///D:/wrod/vue3/node_modules/.pnpm/vite-plugin-mock@3.0.2_esbuild@0.20.2_mockjs@1.1.0_vite@5.2.12_@types+node@20.14.8_sass@1.77.2_/node_modules/vite-plugin-mock/dist/index.mjs";
var vite_config_default = defineConfig(({ command, mode }) => {
  let env = loadEnv(mode, process.cwd());
  return {
    plugins: [
      vue(),
      createSvgIconsPlugin({
        // Specify the icon folder to be cached
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        // Specify symbolId format
        symbolId: "icon-[dir]-[name]"
      }),
      viteMockServe({
        localEnabled: command === "serve"
      })
    ],
    resolve: {
      alias: {
        "@": path.resolve("./src")
      }
    },
    css: {
      preprocessorOptions: {
        scss: {
          javascriptEnabled: true,
          additionalData: '@import "./src/styles/variable.scss";'
        }
      }
    },
    // 代理跨域
    server: {
      proxy: {
        [env.VITE_APP_BASE_API]: {
          target: env.VITE_SERVE,
          // 需要代理跨域
          changeOrigin: true,
          rewrite: (path2) => path2.replace(/^\/api/, "")
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbm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